<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type="text/javascript">
    var app ="/admin.php/ContentModel";
</script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>模型列表</title>
<link href="/Application/Admin/View/public/css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/Application/Admin/View/public/js/jquery.js"></script>

<script type="text/javascript">
$(document).ready(function(){
  // $(".click").click(function(){
  // $(".tip").fadeIn(200);
  // });
  
  $(".tiptop a").click(function(){
  $(".tip").fadeOut(200);
});

  $(".sure").click(function(){
  $(".tip").fadeOut(100);
});

  $(".cancel").click(function(){
  $(".tip").fadeOut(100);
});



});
</script>


</head>


<body>

	<div class="place">
    <span>位置：</span>
    <ul class="placeul">
    <li><a href="<?php echo U('Admin/Index/welcome/');?>">首页</a></li>
    <li><a href="<?php echo U('Admin/ContentModel/index/');?>">模型管理</a></li>
    </ul>
    </div>
    
    <div class="rightinfo">
    
    <div class="tools">
    
    	<ul class="toolbar">
        <li class="click"><a href="<?php echo U('Admin/ContentModel/add');?>"><span><img src="/Application/Admin/View/public/images/t01.png" /></span>添加模型</a></li>

        </ul>
        
        
        <ul class="toolbar1">       
        </ul>
    
    </div>
    
    
    <table class="tablelist">
    	<thead>
    	<tr>
        <th>编号<i class="sort"><img src="/Application/Admin/View/public/images/px.gif" /></i></th>
        <th>标题</th>
        <th>用户</th>
        <th>籍贯</th>
        <th>发布时间</th>
        <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <?php if(is_array($modelData)): foreach($modelData as $key=>$v): ?><tr>
        <td><?php echo ($v["mid"]); ?></td>
        <td><?php echo ($v["mname"]); ?></td>
        <td><?php echo ($v["mfield"]); ?></td>
        <td><?php echo ($v["mmodel_name"]); ?></td>
        <td><?php if($v.mtype==0 ): ?>系统模型    <?php else: ?> 独立模型<?php endif; ?></td>
        <td><a href="<?php echo U('addField/');?>?mname=<?php echo ($v["mmodel_name"]); ?>" class="tablelink">添加字段</a> <a href="<?php echo U('editModel');?>?mname=<?php echo ($v["mmodel_name"]); ?>" class="tablelink">管理模型</a>  <?php if($v.mtype==0 ): ?>系统模型不可删除    <?php else: ?> <a href="javascript:del('<?php echo ($v["mmodel_name"]); ?>');" class="tablelink">删除</a><?php endif; ?>   </td>
        </tr><?php endforeach; endif; ?>
       
        
        </tbody>
    </table>
    
   
   
    
    
    <div class="tip">
    	<div class="tiptop"><span>提示信息</span><a></a></div>
        
      <div class="tipinfo">
        <span><img src="/Application/Admin/View/public/images/ticon.png" /></span>
        <div class="tipright">
        <p>是否确认对信息的修改 ？</p>
        <cite>如果是请点击确定按钮 ，否则请点取消。</cite>
        </div>
        </div>
        
        <div class="tipbtn">
        <input name="" type="button"  class="sure" value="确定" />&nbsp;
        <input name="" type="button"  class="cancel" value="取消" />
        </div>
    
    </div>
    
    
    
    
    </div>
    
    <script type="text/javascript">
	$('.tablelist tbody tr:odd').addClass('odd');
      //删除提示
      function del(name){
         $(".tip").fadeIn(200); 
         $('.sure').click(function(){
            location.href= app + '/del&name='+name;
            $(".tip").fadeOut(200); 
         })
      }
	</script>

</body>

</html>